{extend name='user/public/layout' /}
{block name='content'}
<div class="overflow_h">
    <div class="screen">
        <div class="screen_box01 overflow_h">
            <ul>
                <li><a href="{:url('user.ask/index')}">提问列表</a></li>
                <li><a href="{:url('user.ask/myanswer')}">回答列表</a></li>
                <li><a href="{:url('user.ask/help')}">求助列表</a></li>
                <li><a href="{:url('user.ask/add')}" class="on">我要提问</a></li>
            </ul>
        </div>
    </div>
    <div class="user-nav">
        <form id="info_form" action="{:url('user.ask/addDo')}" onsubmit="return check();" method="post" enctype="multipart/form-data">
            <div class="con_div">
                <ul class="formList width2 list_ul list_mp">
                    <li>
                        <label>问题名称：</label>
                        <input type="text"  name="title" id="title" class="inputStyle width3">
                    </li>
                    <li>
                        <label>所属分类：</label>
                        <select name="cate_id" class="selectStyle">
                            {volist name="askCateTree" id='vo'}
                            <option value="{$vo.id}">{$vo.name}</option>
                            {present name='vo["_child"]'}
                            {volist name='vo["_child"]' id='val'}
                            <option value="{$val.id}">--{$val.name}</option>
                            {/volist}
                            {/present}
                            {/volist}
                        </select>
                    </li>
                    <li class="height3"><label>问题描述：</label><textarea class="textarea" name="content"></textarea></li>
                    <li>
                        <label></label>
                        <input type="submit" value="提 交" class="btnStyle">
                    </li>
                </ul>
            </div>
        </form>

    </div>
</div>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script>
    function check(){
        var title = $('#title').val(),content=$('#content');
        if($.trim(title).length==0){
            layer.msg('请填写问题标题',{icon:2});
            return false;
        }
        if($.trim(content).length==0){
            layer.msg('请填写问题描述',{icon:2});
            return false;
        }
        return true;
    }
</script>
{/block}